package com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.properties;

import com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.properties.nested.FieldTypeMapping;
import com.ideaaedi.zoo.diy.artifact.apidoc.knife4j.properties.nested.SecurityScheme;
import io.swagger.v3.oas.models.info.Info;
import jakarta.validation.Valid;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.validation.annotation.Validated;

import java.util.List;

/**
 * zoo对openapi3的增强配置
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 1.0.0
 */
@Data
@Validated
@ConfigurationProperties(prefix = "springdoc.zoo-knife4j")
public class ZooKnife4jProperties {
    
    /*
     * java代码 与 文档中的字段类型映射
     */
    @Valid
    private List<FieldTypeMapping> fieldTypeMappings;
    
    /*
     * 接口文档信息
     */
    @NestedConfigurationProperty
    private Info info;
    
    /*
     * 接口鉴权能力
     */
    @Valid
    @NestedConfigurationProperty
    private SecurityScheme securityScheme;
    
}
